package at.ltasat.classifier.dt;

import java.util.Arrays;

import at.ltasat.classifier.Membership;
import at.ltasat.classifier.ObjectFeatures;

final class ClassificationNode<D> extends Node<D> {

	private final Membership<D>[] classification;

	public ClassificationNode(Membership<D>[] classification) {
		assert Membership.check(classification);
		this.classification = classification;
	}

	public int getNumberOfMemberships() {
		return classification.length;
	}

	public Membership<D> getMembership(int index) {
		return classification[index];
	}

	@Override
	public Membership<D>[] evaluate(ObjectFeatures features) {
		return classification;
	}
	
	@Override
	public String toString(){
		return Arrays.toString(classification);
	}

}
